﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WebApplication.DTO;

namespace WebApplication.DAO
{
    public class keyDAO
    {
        public static String[] tachKey(String key)
        {
            key = key.Trim();
            String[] subKey = key.Split(' ');
            return subKey;
        }

        public static String gepKey(int[] subKey)
        {
            String kq = "";
            for (int i = 0; i < subKey.Count(); i++)
            {
                if (i > 0 && i < (subKey.Count()))
                {
                    kq += " ";
                }
                kq += subKey[i];
            }
            return kq;
        }
       
        public static void addKeyDTO(List<keyDTO> listKey, String key, int len)
        {
            keyDTO keyPJ = new keyDTO();
            keyPJ.setKey(key);
            keyPJ.setLength(len);
            listKey.Add(keyPJ);
        }
        
    }
}